<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<script>
    function page(n, s) {
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchFormDict").submit();
        return false;
    }
</script>

<div class="panel-body">
    <div class="table-responsive no-border">
        <div class="datatable-top">
            <div class="pull-left">
                <form:form id="searchFormDict" modelAttribute="turnInVo"
                           onsubmit="return loadDivForm('cancelLeaveHospPatientListDiv','searchFormDict','${ctx}/nurse/wardCirculation/findWaitCancelLeaveHospPatientList');"
                           method="post" class="form-inline">
                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                    <%--     <label>类型：</label><form:select id="type" path="type" class="form-control" ><form:option value="" label=""/><form:options items="${typeList}" htmlEscape="false"/></form:select>--%>
                    &nbsp;&nbsp;<label>姓名 ：</label><form:input path="name" htmlEscape="false" maxlength="50"
                                                               class="form-control"/>
                    &nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                </form:form>
            </div>
        </div>
        <table id="contentTable" class="table table-bordered mg-t datatable">
            <thead>
            <tr>
                <th>住院号</th>
                <th>住院天数</th>
                <th>姓名</th>
                <th>性别</th>
                <th>身份</th>
                <th>入院日期</th>
                <th>出院日期</th>
                <th>出院科室</th>
                <th>出院病区</th>
                <th>总共消费</th>
                <th>经治医生</th>
                <th>联系人</th>
                <th>联系电话</th>
                <th>联系地址</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${page.list}" var="turn">
                <tr onclick="showCancelLeaveHospForm('${turn.patientId}','${turn.patVisitId}','${turn.bedRecId}')">
                    <td>${turn.visitNo}</td>
                    <td>${turn.days}</td>
                    <td>${turn.name}</td>
                    <td>${fns:getDictLabel(turn.sex,'SEX_DICT' , '')}</td>
                    <td>${fns:getDictLabel(turn.identity,'PROFESSION_DICT' , '')}</td>
                    <td><fmt:formatDate value="${turn.admissionDate}" pattern="yyyy-MM-dd"></fmt:formatDate></td>
                    <td><fmt:formatDate value="${turn.dischargeDate}" pattern="yyyy-MM-dd"></fmt:formatDate></td>
                    <td>${fns:getDeptName(turn.deptDischargeTo, '')}</td>
                    <td>${fns:getDeptName(turn.wardDischargeTo, '')}</td>
                    <td>${turn.prepayments}</td>
                    <td>${fns:getUserById(turn.doctorInCharge).name}</td>
                    <td>${turn.contacts}</td>
                    <td>${turn.contactsPhone}</td>
                    <td>${turn.contactsAddress}</td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <div class="pagination">${page}</div>
    </div>
</div>



